import request from '@/utils/request'
export default {
    //分页查询
    getPageList(page, limit, searchObj) {
        return request({
                url: '/admin/role/list/'+page+'/'+limit,
                method: 'get',
                params: searchObj
        })
    },
    //删除Role
    removeById(id) {
        return request({
            url: '/admin/role/remove/'+id,
            method: 'delete'
        })
    },
    //新增Role等级
    save(role) {
        return request({
            url: '/admin/role/save',
            method: 'post',
            data: role
        })
    },
    //根据id查询Role
    getById(id) {
        return request({
            url: '/admin/role/'+id,
            method: 'get'
        })
    },
    //修改Role
    updateById(role) {
        return request({
            url: '/admin/role/update',
            method: 'put',
            data: role
        })
    }
}